<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link crossorigin="anonymous"
          integrity="sha512-6KY5s6UI5J7SVYuZB4S/CZMyPylqyyNZco376NM2Z8Sb8OxEdp02e1jkKk/wZxIEmjQ6DRCEBhni+gpr9c4tvA==" href="https://lib.baomitu.com/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<head th:replace="layouts::header"></head>
<br>
<div class="container">
    <form action="/projects/save" th:object="${project}" method="POST">

        <div class="form-group">
            <div class="col-sm-6">
        <input type="text" placeholder="项目名称" th:field="*{name}">
            </div>
        </div>
        <br>

        <div class="form-group">
            <div class="col-sm-6">
        <select th:field="*{stage}">
            <option value="未开始">未开始</option>
            <option value="进行中">进行中</option>
            <option value="已完成">已完成</option>
         </select>
            </div>
        </div>
        <br>

        <div class="form-group">
            <div class="col-sm-6">
            <textarea class="form-control" type="text" placeholder="输入项目描述" th:field="*{description}"></textarea>
            </div>
        </div>
        <br>

    <div class="form-group">
          <div class="col-sm-6">
            <select class="form-control" th:field="*{students}" multiple="multiple">
                 <option th:each="student : ${allStudents}" th:value="${student.studentId}" th:text="${student.name}"></option>
            </select>
          </div>
    </div>
        <br>

        <input type="hidden" name="_csrf" th:value="${_csrf.token}">

        <button type="submit">新建项目</button>
    </form>
</div>
</body>
</html>